<template>
  <div class="kgo-head-horizontal-nav">
      <ul class="layui-nav" lay-filter="">
            <li class="layui-nav-item" v-on:click="setNavItem('project')"><router-link to="/projectHome">项目开发管理</router-link></li>
            <li class="layui-nav-item" v-on:click="setNavItem('common')"><router-link to="/commonHome">通用开发管理</router-link></li>
      </ul>
  </div>
</template>

<script>
//系统信息
export default {
   mounted(){
    layui.element.init();
   },
   methods:{
       /**
        * 如果选择的不是，项目开发管理，项目搜索功能禁用
        */
       setNavItem:function(val){
           if(val=='project'){
               $('.kgo-search-project-select-act').attr('disabled',false);
           }else{
               $('.kgo-search-project-select-act').attr('disabled',true);
           }
           layui.form.render('select', 'kgo-search-project-form-filter');
       }
   }
}
</script>

<style lang="scss">
.kgo-head-horizontal-nav{
    width: 290px;
    position:absolute;
    top:5px;
    left: 700px;
    height: 45px;
    border: 2px #e6e6e6 solid;
    border-radius: 5px;
}
.kgo-head-horizontal-nav .layui-nav{
    background-color: #f2f2f2;
    color: #000000;
}
.kgo-head-horizontal-nav .layui-nav .layui-nav-item{
    line-height: 45px;
}
.kgo-head-horizontal-nav .layui-nav .layui-nav-item a{
    color: rgba(0, 0, 0, 0.7);
}
</style>
